package com.k2data.k2app.mapper;

import com.k2data.k2app.domain.po.SusbTimeIndex;
import com.k2data.k2app.mybatis.mapper.K2Mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lidong9144@163.com 17-3-15.
 */
@Mapper
@Repository
public interface SusbTimeIndexMapper extends K2Mapper<SusbTimeIndex> {

    List<SusbTimeIndex> selectSusb(SusbTimeIndex cond);

    /**
     * 查询客户某年的状态区间
     *
     * @param customerId
     * @param years
     * @return
     */
    List<SusbTimeIndex> selectSusbGroupYear(@Param("customerId") Long customerId, @Param("years") String years);


    /**
     * 查询客户某年的开机时长
     *
     * @param customerId
     * @param years
     * @return
     */
    List<SusbTimeIndex> selectSusbByCustomer(@Param("customerId") Long customerId,@Param("deviceId") Long deviceId, @Param("years") String years);
}
